#ifndef _SCROLL_H_
#define _SCROLL_H_

#ifndef NULL
#define NULL (0L)
#endif

template <typename T>
class DLList {
private:
	template <typename T>
	struct Page {
		Page<T>* next;
		T item;
		Page<T>* previous;

		Page<T>(T _item) : item(_item), next(NULL), previous(NULL) {}
	};
	
	Page<T>* first;
	Page<T>* last;
	unsigned int size;

public:
	DLList<T>(void);
	DLList<T>(const DLList<T>& that);
	~DLList<T>(void);
	DLList<T>& operator=(const DLList<T>& that);
	DLList<T>* operator->();
	T& operator[](unsigned int index);

	void AddFront(const T& item);
	void AddBack(const T& item);
	void RemoveBack(void);
	void RemoveFront(void);
	void RemoveAt(unsigned int index);
	void RemoveAll(void);
	unsigned int Size(void);
};

#include "DLList.hpp"

#endif //_SCROLL_H_